package com.foreverwin.mes.common.service.impl;

import com.foreverwin.mes.core.base.FrontPage;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.foreverwin.mes.common.model.EapLog;
import com.foreverwin.mes.common.mapper.EapLogMapper;
import com.foreverwin.mes.common.service.EapLogService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
/**
 * <p>
 * 物料耗用 服务实现类
 * </p>
 *
 * @author Ervin Chen
 * @since 2020-03-20
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class EapLogServiceImpl extends ServiceImpl<EapLogMapper, EapLog> implements EapLogService {


    @Autowired
    private EapLogMapper eapLogMapper;

    @Override
    public Page<EapLog> selectPage(FrontPage<EapLog> frontPage, EapLog eapLog) {
        EntityWrapper<EapLog> queryWrapper = new EntityWrapper<>();
        queryWrapper.setEntity(eapLog);
        return super.selectPage(frontPage.getPagePlus(), queryWrapper);
    }

    @Override
    public List<EapLog> selectList(EapLog eapLog) {
        EntityWrapper<EapLog> queryWrapper = new EntityWrapper<>();
        queryWrapper.setEntity(eapLog);
        return super.selectList(queryWrapper);
    }


}